<include file="public@head"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">所有评论</a></li>
    </ul>
    <table class="table table-hover table-bordered margin-top-20">
        <thead>
        <tr>
            <th width="50">ID</th>
            <th>名称</th>
            <th>内容</th>
            <th>评论时间</th>
            <td>状态</td>
            <th width="160">{:lang('ACTIONS')}</th>
        </tr>
        </thead>
        <tbody>
        <php>
            $user_status=array("0"=>"未审核","1"=>"已审核");
        </php>
        <foreach name="comments" item="vo">
            <tr>
                <td>
                    {$vo.id}
                </td>
                <td>{$vo.full_name}</td>
                <td>
                    {$vo.content}
                </td>
                <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                <td>{$user_status[$vo['status']]}</td>
                <td>
                    <php>
                        $url = json_decode($vo['url'],true);
                    </php>
                    <a href="{:cmf_url($url['action'],$url['param'])}#comment{$vo.id}" target="_blank">
                        查看原文
                    </a>&nbsp;
                    <empty name="vo.status">
                        <a href="{:cmf_plugin_url('Comment://AdminIndex/cancelban',array('id'=>$vo['id']))}"
                           class="js-ajax-dialog-btn"
                           data-msg="确定要审核这条信息吗？">审核</a>
                        <else/>
                        <a href="{:cmf_plugin_url('Comment://AdminIndex/ban',array('id'=>$vo['id']))}"
                           class="js-ajax-dialog-btn"
                           data-msg="确定要加入未审核吗？">未审核</a>
                    </empty>
                    <a class="js-ajax-dialog-btn"
                       href="{:cmf_plugin_url('Comment://AdminIndex/delete',array('id'=>$vo['id']))}"
                       data-msg="您确定要删除评论吗？" data-ok="" data-cacel="取消">删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <ul class="pagination">
        {$page}
    </ul>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>